<template>
  <page-wrap stayStill back title="招聘会详情" hideTab>
    <view class="zph-detail" @click="handlePageClick">
      <view class="detail-top">
        <image :src="detailInfo.backgroundPath || detailInfo.bannerPath" mode="" class="banner" />
        <view class="info">
          <view class="title">{{detailInfo.title}}</view>
          <view class="time">
            <text class="icon icon-time"></text>
            {{detailInfo.startTime}}～{{detailInfo.endTime}}
          </view>
        </view>
        <u-sticky :offset-top="navHeight">
          <view class="header u-border-bottom" :class="{'border-radius': current == 1}">
            <view class="tabs-swiper">
              <u-tabs-swiper ref="tabs" :is-scroll="false" :list="tabList" :current="current" active-color="#333333"
                inactive-color="#666666" bar-width="56" bar-height="14" :bar-style="barStyleObj" gutter="96"
                :duration="0.2" :active-item-style="activeStyle" font-size="28" @change="handleTab">
              </u-tabs-swiper>
            </view>

            <view class="search-filter" v-if="isShowFilter && current == 0">
              <view class="btn btn-trade" @click="showTrade = !showTrade">{{tradeName}} <u-icon name="arrow-down-fill"
                  size="18"></u-icon></view>
              <view class="region-name" :class="{'region-on': region}" @click="showRegion = !showRegion">
                <u-icon v-if="region" name="map" :color="$primaryColor" size="28"></u-icon>
                {{regionName}}
                <u-icon v-if="!region" name="arrow-down-fill" size="18"></u-icon>
              </view>

              <view v-if="current == 0" class="content-search" :class="isShowSearch? 'show': ''" @click.stop>
                <input type="text" v-model="keyword" class="input-search" :class="keyword? 'keyword': ''"
                  placeholder="请输入职位/公司搜索" @input="handleInput" @confirm="handleInputConfirm" />
                <u-icon name="search" :color="isShowSearch? '#444444': '#999999'" @click="handleSearchIconClick"
                  size="32"></u-icon>
                <view v-if="isShowSearchBtn" class="btn btn-primary btn-search" @click="handleSearchClick">搜索</view>
              </view>
            </view>
          </view>
        </u-sticky>
      </view>
      <swiper class="swiper-box" :style="{minHeight: swiperHeight}" :duration="200" :current="swiperCurrent"
        @transition="handleTransition" @animationfinish="handleAnimation">
        <swiper-item class="swiper-item">
          <view class="search-filter">
            <view class="btn btn-trade" @click="showTrade = !showTrade">{{tradeName}} <u-icon name="arrow-down-fill"
                size="18"></u-icon></view>
            <view class="region-name" :class="{'region-on': region}" @click="showRegion = !showRegion">
              <u-icon v-if="region" name="map" :color="$primaryColor" size="28"></u-icon>
              {{regionName}}
              <u-icon v-if="!region" name="arrow-down-fill" size="18"></u-icon>
            </view>
            <view v-if="current == 0" class="content-search" :class="isShowSearch? 'show': ''" @click.stop>
              <input type="text" v-model="keyword" class="input-search" :class="keyword? 'keyword': ''"
                placeholder="请输入职位/公司搜索" @input="handleInput" @confirm="handleInputConfirm" />
              <u-icon name="search" :color="isShowSearch? '#444444': '#999999'" @click="handleSearchIconClick"
                size="32"></u-icon>
              <view v-if="isShowSearchBtn" class="btn btn-primary btn-search" @click="handleSearchClick">搜索</view>
            </view>
          </view>
          <!-- <scroll-view scroll-y class="scroll-views-search" @scrolltolower="loadMoreCompany"> -->
          <view class="company-list">

            <CompanyJob v-for="(item, index) in companyList" :key="item.companyId" :item="item"
              :belongType="detailInfo.belongType" :activityId="activityId" @deliver="handleDeliver($event, index)" />
            <u-loadmore :status="moreLoading" :load-text="loadText" v-if="companyList.length || !loaded" />
            <Empty v-if="loaded && !companyList.length" :baseImg="emptyImg" textColor="#333333" text="职位发布中，敬请期待"
              fontSize="28" :fontWeight="400" />
          </view>
          <!-- </scroll-view> -->
        </swiper-item>

        <swiper-item class="swiper-item">
          <scroll-view scroll-y class="scroll-views">
            <view class="content" v-html="detailInfo.content"></view>
            <Empty v-if="!detailInfo.content" :baseImg="emptyImg" text="活动即将开启，敬请期待" :fontWeight="400" />
          </scroll-view>
        </swiper-item>

        <swiper-item class="swiper-item">
          <MajorTable class="tableContent" :rightCount="rightAICount" :pageIndex="rightAIIndex"
            @shouldlogin="showLoginDialog" @onGoToInterview="showConfirmCancelDialog"></MajorTable>
        </swiper-item>

      </swiper>
    </view>
    <u-select v-model="showTrade" :list="tradeList" value-name="totalid" label-name="tname"
      @confirm="selectConfirm"></u-select>
    <u-popup v-model="showRegion" mode="bottom" safe-area-inset-bottom>
      <scroll-view scroll-y="true" style="height: 50vh">
        <region-filter class="more-child" :limit="false" :form-data="region" :prop-list="region.propList"
          @confirm="handleConfirm"></region-filter>
      </scroll-view>
    </u-popup>
    <!-- <u-image class="act-btn" width="150rpx" height="150rpx" :src="actBtnSrc" @click="clickActBtn"></u-image> -->
    <LoginDialog ref="loginDialog" @loginSuccessBack="loginSuccessBack"></LoginDialog>

    <u-modal v-model="isConfirmCancelModalShow" :content="content" :confirm-text="confirmText" :cancel-text="cancelText"
      :show-cancel-button="true" @confirm="onClickConfirm" :mask-close-able="true" :title="titleText"
      @cancel="onClickCancel"></u-modal>
    <ResumeDeliverDialog
      ref="resumeDeliverDialog"
      @deliverySuccess="hanldeDeliverySuccess"
    >
    </ResumeDeliverDialog>
  </page-wrap>
</template>

<script>
import CompanyJob from "../components/CompanyJob.vue";
import MajorTable from "../components/MajorTable.vue";
import RegionFilter from "@/components/RegionFilter.vue";
import Empty from "@/components/Empty.vue";
import ResumeDeliverDialog from "@/components/ResumeDeliverDialog";

import { getZphDetail, getZphCompanyList } from "@/api/modules/zph.js";
import { getAllTotalInfo, personSendJob, sendJob } from "@/api/index.js";

import { pxToRpx, extractParams, httpToHttps } from "@/utils/handle.js";
import ShareMixin from "@/mixins/share";
import LoginMixin from "@/mixins/login.js";
import LoginDialog from "@/components/LoginDialog";
import { reqZphGetRights, refAddPoint } from "@/api/modules/company.js";

export default {
  mixins: [ShareMixin, LoginMixin],
  components: {
    CompanyJob,
    RegionFilter,
    Empty,
    LoginDialog,
    MajorTable,
    ResumeDeliverDialog,
  },
  data() {
    return {
      personId: uni.getStorageSync("person-id").slice(2) || "",
      activityId: "",
      detailInfo: null,
      companyList: [],
      current: 0,
      swiperCurrent: 0,
      tabList: [
        {
          name: "企业职位",
        },
        {
          name: "平台介绍",
        },
      ],
      keyword: "",
      isShowSearch: false,
      isShowSearchBtn: false,
      showTrade: false,
      showRegion: false,
      tradeId: "",
      tradeName: "行业",
      regionName: "地区",
      region: "",
      propList: ["region", "regionName"],
      tradeList: [],
      pageParams: {
        pageNo: 1,
        pageSize: 20,
      },
      finished: false,
      loading: false,
      emptyImg: this.$imgBaseSelf + "common/empty.png",
      delivering: false,
      barStyleObj: {
        backgroundColor: "transparent",
        backgroundImage: `url(${this.$imgBaseSelf}/select.png)`,
        backgroundSize: "100% 100%",
        borderRadius: "0",
      },
      activeStyle: {
        color: "#333333",
        fontSize: "32rpx",
      },
      moreLoading: "loadmore",
      loadText: {
        loadmore: "加载更多",
        loading: "加载中",
        nomore: "已经到底啦",
      },
      loaded: false,
      swiperHeight: 0,
      navHeight: pxToRpx(getApp().globalData.navHeight),
      isShowFilter: false,
      headerHeight: 0,
      rightAICount: 3,
      rightAIIndex: 0,
      actBtnSrc: this.$imgBaseSelf + "zph/activityBg6.png",
      isConfirmCancelModalShow: false,
      content: "您之前未完成本场面试，是否加载历史进度继续面试？",
      record: "",
      confirmText: "继续面试",
      cancelText: "重新面试",
      titleText: "温馨提示",
      positionId: "",
      type: "",
      channel: "",
      selectedData: '', // 选择投递的职位的相关数据
      listIndex: '', // 选择投递的职位所在公司列表索引
    };
  },
  onLoad(opt) {
    if (opt) {
      if (opt.scene) {
        const scene = decodeURIComponent(opt.scene);
        const params = extractParams(scene);
        this.activityId = params["a"] || "";
        let type = params["t"] || "";
        if (type == "ai") {
          this.current = 2;
          this.swiperCurrent = 2;
        }
      } else {
        if (opt.activityId) {
          this.activityId = opt.activityId;
          this.sharePath =
            "/pagesSub/careerGrow/zph/detail?activityId=" + this.activityId;
          this.shareQuery = 'activityId=' + this.activityId;

          // // 指定招聘会分享跳转
          // if (this.activityId == '2031721125699544') {
          //   this.sharePath =
          //     "/pagesSub/activity/sxh/index?fromtag=activity";
          // }
        }
        if (opt.type == "ai") {
          this.current = 2;
          this.swiperCurrent = 2;
        }
      }
    }
  },
  onShow() {
    this.zhituGetRightsInfo();
    let key = "TabResultKey";
    var value = uni.getStorageSync(key);
    if (value && value == 1) {
      uni.setStorageSync(key, "");
      this.$nextTick(() => {
        this.rightAIIndex = 1;
      });
    }
  },
  // onShareAppMessage() {
  //   return {
  //     title: this.$selfName + ' - ' + this.detailInfo.title,
  //     path: "/pagesSub/career/zph/detail?activityId=" + this.activityId,
  //   };
  // },
  // onShareTimeline() {
  //   return {
  //     title: this.$selfName + ' - ' + this.detailInfo.title,
  //     path: "/pagesSub/career/zph/detail?activityId=" + this.activityId,
  //   };
  // },
  onReachBottom() {
    if (this.current == 0) {
      this.getCompanyList(true);
    }
  },
  onPageScroll(res) {
    this.isShowFilter = res.scrollTop > (this.headerHeight || 133 + 102 + 32);
  },
  mounted() {
    this.getData();
    // this.getCompanyList();
    this.getAllTotalInfo();
    this.getHeaderHeight();
  },

  methods: {
    clickActBtn() {
      this.personId = uni.getStorageSync("person-id").slice(2) || undefined;
      if (!this.personId) {
        this.showLoginDialog();
        return;
      }

      uni.navigateTo({
        url: "./zphActivity?activityId=" + this.activityId,
      });
    },

    getData() {
      const params = {
        activityId: "" + this.activityId,
        personId: "" + this.personId,
      };
      getZphDetail(params).then((res) => {
        if (res && res.code == 200) {
          this.detailInfo = res.data;
          this.detailInfo.title = this.detailInfo.title.replace(/&quot;/g, '"');
          this.detailInfo.backgroundPath = httpToHttps(this.detailInfo.backgroundPath);
          this.detailInfo.bannerPath = httpToHttps(this.detailInfo.bannerPath);

          this.detailInfo.content = this.detailInfo.content.replace(
            /<img/g,
            '<img width="100%" '
          );
          this.shareTitle = this.$selfName + " - " + this.detailInfo.title;
          this.imageUrl =
            this.detailInfo.backgroundPath || this.detailInfo.bannerPath;
        } else {
          uni.showToast({
            title: res.status_desc,
            icon: "none",
          });
        }
        this.getCompanyList();
      });
    },
    searchZph() {
      this.pageParams.pageNo = 1;
      // this.finished = false;
      this.moreLoading = "loadmore";
      this.getCompanyList();
    },
    getCompanyList(isMore) {
      // if(this.loading || this.finished) return;
      if (this.moreLoading == "loading" || this.moreLoading == "nomore") return;
      const params = {
        activityId: this.activityId,
        personId: this.personId,
        pageNo: this.pageParams.pageNo,
        pageSize: this.pageParams.pageSize,
        totalTradeId: this.tradeId,
        regionId: this.region,
        keyword: this.keyword,
        belongType: this.detailInfo.belongType || "",
      };
      // this.loading = true;
      this.moreLoading = "loading";
      getZphCompanyList(params).then((res) => {
        // this.loading = false;
        this.moreLoading = "loadmore";
        this.loaded = true;
        if (res && res.code == 200) {
          const data = res.data.map(item => {
            item.companyLogo = httpToHttps(item.companyLogo);
            return item;
          });
          if (isMore) {
            this.companyList.push(...data);
          } else {
            this.companyList = data;
          }
          if (this.pageParams.pageNo >= res.pageparam.pages) {
            // this.finished = true;
            this.moreLoading = "nomore";
          }
          // if (res.data && !res.data.length) {
          //   this.moreLoading = "nomore";
          // }
          this.pageParams.pageNo++;

          this.$nextTick(() => {
            this.setListHeight();
          });
        } else {
          // this.finished = true;
          this.moreLoading = "nomore";
          uni.showToast({
            title: res.status_desc,
            icon: "none",
          });
        }
      });
    },
    getAllTotalInfo() {
      getAllTotalInfo().then((res) => {
        this.tradeList = res.data;
        this.tradeList.unshift({
          tname: "不限",
          totalid: "",
        });
      });
    },
    handleTab(index) {
      console.log("🚀 ~ handleTab ~ index:", index);
      this.swiperCurrent = index;
      if (index == 2) {
        this.commitBuringPoint();
      }
    },
    handleTransition(e) {
      let dx = e.detail.dx;
      this.$refs.tabs.setDx(dx);
    },
    handleAnimation(e) {
      let current = e.detail.current;
      this.$refs.tabs.setFinishCurrent(current);
      this.swiperCurrent = current;
      this.current = current;
      if (this.current == 0) {
        this.setListHeight();
      } else if (this.current == 1) {
        this.setContentHeight();
      } else {
        this.setAIContentHeight();
      }
    },
    handleSearchClick() {
      this.searchZph();
    },
    handleConfirm(data) {
      this.propList.forEach((ele, idx) => {
        this[ele] = data[idx];
      });
      this.showRegion = false;
      this.searchZph();
    },
    selectConfirm(e) {
      this.tradeId = e[0].value;
      this.tradeName = e[0].label;
      this.searchZph();
    },
    loadMoreCompany() {
      this.getCompanyList(true);
    },
    handleInput(e) {
      this.isShowSearchBtn = !!this.keyword;
      if (!this.keyword) {
        this.reset();
        this.searchZph();
      }
    },
    handleInputConfirm() {
      this.searchZph();
    },
    handlePageClick() {
      this.isShowSearch = false;
      this.isShowSearchBtn = false;
    },
    handleSearchIconClick() {
      if (this.isShowSearch) {
        if (!this.keyword) {
          this.reset();
        }
        this.searchZph();
      }
      this.isShowSearch = true;
      if (this.keyword) {
        this.isShowSearchBtn = true;
      }
    },
    handleDeliver(data, listIndex) {
      this.personId = uni.getStorageSync("person-id").slice(2) || undefined;
      if (!this.personId) {
        this.showLoginDialog();
      } else {
        this.selectedData = data;
        this.listIndex = listIndex;
        this.verifyResumeDelivery(data, listIndex);
        // this.deliver(item, index);
      }
    },
    showLoginDialog() {
      this.$refs.loginDialog.setVisibility(true);
    },
    loginSuccessBack() {
      console.log("loginSuccessBack");
      this.zhituGetRightsInfo();
    },

    deliver(data, listIndex) {
      if (this.delivering) return;
      uni.showLoading({
        title: "投递中",
      });

      // const params = {
      //   title: '',
      //   content: '',
      //   companyId: data.company.companyId,
      //   jobId: data.job.jobId,
      //   job: data.job.jtzw,
      //   personId: this.personId,
      //   wage: "0",
      // };
      const params = {
        title: "",
        content: "",
        company: data.company.companyId,
        position: data.job.jobId,
        job: data.job.jtzw,
        user: this.personId,
        wage: "0",
      };
      this.delivering = true;
      sendJob(params)
        .then((res) => {
          uni.hideLoading();
          this.delivering = false;
          // if(res.code==200) {
          //   uni.showToast({
          //     title: '投递成功',
          //     icon: 'none',
          //   });
          // this.companyList[listIndex].zpArr[data.index].deliverStatus = 1;

          // } else if(res.code == 401) {
          //   uni.showModal({
          //     title: "提示",
          //     content: "您的简历未完善，填写完善后即可投递简历",
          //     success: function (modalRes) {
          //       if (modalRes.confirm) {
          //         uni.navigateTo({
          //           url: '/pagesSub/newResume/index'
          //         });
          //       }
          //     },
          //   });
          // } else {
          //   uni.showToast({
          //     title: res.status_desc,
          //     icon: 'none',
          //   });
          // }
          var _data = res;
          if (_data && _data.status == "OK") {
            this.companyList[listIndex].zpArr[data.index].deliverStatus = 1;
            uni.showToast({
              icon: "none",
              title: "投递成功",
            });
          } else if (_data && _data.code == "1") {
            uni.showModal({
              title: "提示",
              content: "您的简历未完善，填写完善后即可投递简历",
              success: function (modalRes) {
                if (modalRes.confirm) {
                  uni.navigateTo({
                    url: "/pagesSub/newResume/index",
                  });
                }
              },
            });
          } else {
            let errorMsg = _data.status_desc || "";
            switch (_data.code) {
              case "2": // 2:三天内对同一职位进行投递     － －正常投递
                errorMsg = "三天内不能对同一职位进行重复投递！";
                break;
              case "10": // 10:人才已针对此公司保密      － －正常投递
                errorMsg = "您已对该公司进行屏蔽，请确认！";
                break;
              case "502":
                errorMsg = "您今日的投递次数已用完，请明天再投！";
                break;
            }
            uni.showToast({
              title: errorMsg,
              icon: "none",
            });
          }
        })
        .catch((err) => {
          uni.hideLoading();
          this.delivering = false;
        });
    },
    reset() {
      this.region = "";
      this.regionName = "地区";
      this.tradeId = "";
      this.tradeName = "行业";
    },
    setListHeight() {
      uni
        .createSelectorQuery()
        .in(this)
        .select(".company-list")
        .boundingClientRect((data) => {
          this.swiperHeight = data.height + 65 + "px";
        })
        .exec();
    },
    setContentHeight() {
      uni
        .createSelectorQuery()
        .in(this)
        .select(".content")
        .boundingClientRect((data) => {
          this.swiperHeight = data.height + "px";
        })
        .exec();
    },
    setAIContentHeight() {
      uni
        .createSelectorQuery()
        .in(this)
        .select(".tableContent")
        .boundingClientRect((data) => {
          this.swiperHeight = data.height + "px";
        })
        .exec();
    },
    getHeaderHeight() {
      uni
        .createSelectorQuery()
        .in(this)
        .select(".detail-top")
        .boundingClientRect((data) => {
          this.headerHeight = data.height;
        })
        .exec();
    },

    // 获取用户AI面评权益
    zhituGetRightsInfo() {
      this.personId = uni.getStorageSync("person-id").slice(2) || undefined;
      if (!this.personId) {
        return;
      }
      let params = {
        personId: this.personId,
        modelType: "zph",
      };
      reqZphGetRights(params)
        .then((res) => {
          if (res.code == 200) {
            this.rightAICount = res.data.rightsNum;
          } else {
            uni.showToast({
              title: res.status_desc,
              icon: "error",
            });
          }
        })
        .catch((err) => {});
    },
    commitBuringPoint() {
      let modelType = "zph";
      let params = {
        optCode: "enterZphAIInterview",
        platform: "1",
        personId: this.personId,
        moduleType: modelType,
      };
      refAddPoint(params).then((res) => {
        if (res.code == 200) {
          console.log("commitBuringPoint", res);
        }
      });
    },
    showConfirmCancelDialog(type, positionId, record, channel, infoId) {
      console.log(
        "showConfirmCancelDialog",
        this.type,
        this.positionId,
        this.record,
        this.channel
      );
      this.type = type;
      this.positionId = positionId;
      this.record = record;
      this.channel = channel;
      this.infoId = infoId;
      console.log("showConfirmCancelDialog", type, positionId, record, channel);
      this.isConfirmCancelModalShow = true;
    },
    onClickConfirm() {
      uni.navigateTo({
        url:
          "/pagesSub/companyCenter/interviewAI/room/interviewReady?from=" +
          this.type +
          "&careerId=" +
          this.positionId +
          "&recordId=" +
          this.record +
          "&channel=" +
          this.channel +
          "&infoId=" +
          this.infoId,
      });
    },
    onClickCancel() {
      uni.navigateTo({
        url:
          "/pagesSub/companyCenter/interviewAI/room/interviewReady?from=" +
          this.type +
          "&careerId=" +
          this.positionId +
          "&channel=" +
          this.channel,
      });
    },
    hanldeDeliverySuccess(){
      this.companyList[this.listIndex].zpArr[this.data.index].deliverStatus = 1;
    },
    // 投递简历校验
    verifyResumeDelivery(data){ 
      this.$refs.resumeDeliverDialog.verifyResumeDelivery({
        companyId: data.company.companyId,
        positionId: data.job.jobId,
        jobName: data.job.jtzw,
        personId: this.personId,
        activityId: this.activityId,
      } );  
    }, 
  },
};
</script>

<style lang="scss" scoped>
.act-btn {
  position: fixed;
  right: 30rpx;
  bottom: 70rpx;
}

.zph-detail {
  // flex-grow: 1;
  // display: flex;
  // flex-direction: column;
  // height: 1rpx;
}
.banner {
  width: 100%;
  height: 267rpx;
}

.detail-top {
  .info {
    margin-bottom: 32rpx;
    padding: 32rpx;
    border-radius: 0 0 30rpx 30rpx;
    background-color: #fff;
    .title {
      margin-bottom: 6rpx;
      font-size: 34rpx;
      font-weight: 500;
      color: #000000;
      line-height: 48rpx;
    }
    .time {
      font-size: 28rpx;
      color: #999999;
      .icon-time {
        width: 24rpx;
        height: 24rpx;
        margin-right: 12rpx;
        margin-top: -2rpx;
        background-image: url($img-base + "common/time.png");
      }
    }
  }

  .header {
    // position: sticky;
    // top: 100px;
    position: relative;
    padding-bottom: 24rpx;
    // border-radius: 30rpx 30rpx 0 0;
    background-color: #fff;

    &.border-radius {
      border-radius: 0;
    }

    .tabs-swiper {
      margin-left: -14rpx;
      width: 600rpx;
      padding-top: 12rpx;
    }

    .search-filter {
      padding-bottom: 0;
    }
  }
}

.search-filter {
  position: relative;
  // margin-top: 24rpx;
  padding: 32rpx;
  font-size: 28rpx;

  .btn-trade {
    display: inline-block;
    margin-right: 40rpx;
    padding: 0 13rpx;
    height: 44rpx;
    line-height: 44rpx;
    color: #666666;
    background-color: #f7f7f7;
    border-radius: 4rpx;

    ::v-deep .u-icon {
      margin-left: 12rpx;
    }
  }

  .region-name {
    display: inline-block;
    padding: 0rpx 16rpx;
    height: 44rpx;
    line-height: 44rpx;
    color: #666666;
    background-color: #f7f7f7;
    border-radius: $uni-border-radius-sm;

    ::v-deep .u-icon {
      margin-left: 12rpx;
    }
  }

  .region-on {
    color: $u-type-primary;
    background-color: $bg-color-button;
    ::v-deep .u-icon {
      margin-left: 0;
      margin-right: 4rpx;
    }
  }
}

.content-search {
  position: absolute;
  z-index: 2;
  top: 20rpx;
  right: 24rpx;
  display: inline-flex;

  .input-search {
    width: 0;
    height: 68rpx;
    font-size: 28rpx;
    line-height: 68rpx;
    transition: width 0.5s;
  }

  u-icon {
    margin-right: 12rpx;
  }

  .icon-search {
    width: 48rpx;
    height: 48rpx;
    margin-top: 14rpx;
    margin-right: 16rpx;
    background-image: url($img-base + "report/search.png");
  }

  .btn-search {
    position: absolute;
    top: 4rpx;
    right: 0;
    z-index: 2;
    width: 126rpx;
    height: 60rpx;
    line-height: 60rpx;
    border-radius: 40rpx;
  }

  &.show {
    border-radius: 40rpx;
    background-color: #f1f1f2;

    .input-search {
      width: 236rpx;
      font-size: 24rpx;
      padding: 0 24rpx;
      padding-right: 70rpx;
    }

    u-icon {
      margin-right: 32rpx;
    }
  }
}

.swiper-box {
  // flex-grow: 1;
  // height: 1rpx;
  // display: flex;
  // flex-direction: column;
  min-height: 100vh;
  /* #ifdef H5 */
  ::v-deep .uni-swiper-wrapper {
    // flex-grow: 1;
    // height: 1rpx;
    uni-scroll-view {
      height: 100%;
    }
  }
  /* #endif */

  .swiper-item,
  .scroll-views {
    height: 100%;
    background-color: $uni-bg-color;
  }
  .scroll-views-search {
    height: calc(100% - 108rpx);
  }
}

::v-deep {
  .nodata {
    padding-top: 126rpx;
  }
  .company-job {
    .nodata {
      padding: 0;
    }
    .empty_image {
      width: 140rpx;
      margin-bottom: 0;
    }
  }
}
</style>